<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

        <ui:composition
            xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:p="http://primefaces.org/ui"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:ui="http://java.sun.com/jsf/facelets">
            <h:panelGrid columns="7" cellpadding="0" cellspacing="5" style="width: 100%;">
                <h:outputLabel value="#{bundle.cif}"/><h:outputLabel value=":" />  
                <p:inputText value="#{searchLoanBean.cif}" style="width: 100px" >
                    <f:ajax event="change" />
                </p:inputText>
                <h:outputLabel value="#{bundle.globalName}"/><h:outputLabel value=":" />  
                <p:inputText value="#{searchLoanBean.nama}" style="width: 270px" >
                        <f:ajax event="change" />
                </p:inputText>
                
                <p:commandButton icon="ui-icon-search" iconPos="center" styleClass="btnSmall" process="@this" 
                                 update="#{lookupLoanComponenId}lookSavTable" actionListener="#{searchLoanBean.loadData()}" >
                    <f:setPropertyActionListener target="#{searchLoanBean.approvalUid}" value="#{loanApprovalUid}" />
                    <f:setPropertyActionListener target="#{searchLoanBean.loanStatus}" value="#{loanStatusLoan}" />
                </p:commandButton>
                
            </h:panelGrid>

            <p:dataTable id="#{lookupLoanComponenId}lookSavTable" var="looksav" value="#{searchLoanBean.lazyModel}"
                        selection="#{searchLoanBean.selectedData}" selectionMode="single" rowKey="#{looksav.loanId}"
                        resizableColumns="true" rowIndexVar="noUrut" 
                        paginator="true" rows="5" paginatorPosition="bottom" paginatorTemplate="{CurrentPageReport}  {PreviousPageLink} {PageLinks} {NextPageLink}" >
                <p:ajax event="rowSelect" />  
                <p:column style="width: 110px" >
                    <f:facet name="header">#{bundle.loanNo}</f:facet>
                    <h:outputText value="#{looksav.loanNo}" />
                </p:column>
                <p:column style="width: 90px" >
                    <f:facet name="header">#{bundle.cif}</f:facet>
                    <h:outputText value="#{looksav.customer.cif}" />
                </p:column>
                <p:column style="width: 310px" >
                    <f:facet name="header">#{bundle.globalName}</f:facet>
                    <h:outputText value="#{looksav.customer.customerName}" />
                </p:column>
            </p:dataTable>   
        </ui:composition>

